Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce plugin manager static analysis file #204

Merged
merged 13 commits into from
Mar 2, 2024

Conversation

boesing
Copy link
Member

@boesing boesing commented Aug 27, 2023

Q A
QA yes

Description

Test is currently failing, I will debug this file with psalm to provide a proper fix to psalm itself.

@boesing
Copy link
Member Author

boesing commented Aug 27, 2023

Psalm fix is available in vimeo/psalm#10157

@boesing boesing added this to the 4.0.0 milestone Aug 27, 2023
@boesing boesing force-pushed the qa/static-analysis branch from a9e6991 to a0e4aee Compare August 29, 2023 17:16
@boesing boesing force-pushed the qa/static-analysis branch from ee7e23c to 0b2ee8a Compare August 29, 2023 21:41
composer.json Outdated Show resolved Hide resolved
@boesing boesing force-pushed the qa/static-analysis branch 2 times, most recently from 2536d01 to 4fcf1d7 Compare August 29, 2023 22:52
@boesing boesing force-pushed the qa/static-analysis branch 2 times, most recently from b458dfd to fe416be Compare September 10, 2023 12:43
boesing added 11 commits March 2, 2024 23:15
Signed-off-by: Maximilian Bösing <[email protected]>
To enable proper static analysis without side-effects, we are removing the container plugin here to verify provided psalm-types from `ServiceLocatorInterface` and `PluginManagerInterface`

Signed-off-by: Maximilian Bösing <[email protected]>
… by `psalm.xml`

Due to the way, psalm moves forward, this issue will be removed - most probably with v6.
The reasoning behind this is, that `mixed` is not bad per-se, depending on how it is used.
If a codebase accepts `mixed` in a method (even tho that might be revealing method complexity), that is a absolutely okay and thus, passing `mixed` and esp. assigning `mixed` is absolutely fine in case the following code is accepting mixed and/or the value is narrowed down at some point.

Signed-off-by: Maximilian Bösing <[email protected]>
…er#build`

The `AbstractSingleInstancePluginManager` has to always return an object as thats what it is used for. Therefore, type-narrowing here is absolutely fine and still fits liskov substitution principle.

Signed-off-by: Maximilian Bösing <[email protected]>
@boesing boesing force-pushed the qa/static-analysis branch from 6194496 to 9fa7191 Compare March 2, 2024 22:31
boesing added 2 commits March 2, 2024 23:34
…tion.NoAssignment` for inline var annotation

Signed-off-by: Maximilian Bösing <[email protected]>
These methods were initially introduced to fix psalm issues. These were fixed in one of the more recent versions and thus these methods are redundant as of now.

Signed-off-by: Maximilian Bösing <[email protected]>
@boesing boesing merged commit a18bb35 into laminas:4.0.x Mar 2, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant